@CB WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 Initialize WINDOW routines CALL WINIT(ACCESS,VMODE) INTEGER ACCESS,VMODE INPUT ACCESS: Access mode 0 : Through BIOS 1 : Direct access but watch for snow 2 : Direct (Very Fast) OUTPUT VMODE : Video Mode 7 : Monochrome 3 : Color 2 : Black and White This call initialize the window routines. The access entry determines which method is used for writing to screen. BIOS is best used if you are using this program in multitasking environment like DESQView, but for all other purposes use the direct method (1 or 2). If you are using one of the old CGA cards choose '1' because this will minimize the snow on screen. Use '2' for the fastest possible screen display. __________________________________________________________________________ Make a new WINDOW CALL MKWIND(I,J,ID,JD,IWATT,BTYPE,IBATT) INTEGER BTYPE INPUT I : UPPER LEFT WINDOW CORNER COLUMN J : UPPER LEFT WINDOW CORNER ROW ID : # OF COLUMNS IN WINDOW JD : #OF ROWS IN WINDOW IWATT : ATTRIBUTE OF WINDOW BTYPE : BORDER TYPE 0 : No Border 1 : Double Line Border 2 : Single Line Border IBATT : ATTRIBUTE OF BORDER Note : If equal to '0' then it will use same Attribute as the window. This call will make a new window. This will be the current window and will be referenced in all window calls. __________________________________________________________________________ Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 Close the CURRENT WINDOW CALL CLWIND This call will close the last opened window, and will restore the screen over written by the opened window. __________________________________________________________________________ Copy Buffer to Screen CALL COPBUF(I,J,ID,JD,BUFFER) CHARACTER*1 BUFFER(ID*JD*2) INPUT I : UPPER LEFT WINDOW CORNER COLUMN J : UPPER LEFT WINDOW CORNER ROW ID : # OF COLUMNS IN WINDOW JD : #OF ROWS IN WINDOW BUFFER: ARRAY TO STORE SCREEN AT This call will copy the content of the buffer to a window on screen with the given location and size. ___________________________________________________________________________ Copy Screen Window to Memory CALL COPSCR(I,J,ID,JD,BUFFER) CHARACTER*1 BUFFER(ID*JD*2) INPUT I : UPPER LEFT WINDOW CORNER COLUMN J : UPPER LEFT WINDOW CORNER ROW ID : # OF COLUMNS IN WINDOW JD : #OF ROWS IN WINDOW BUFFER: ARRAY TO STORE SCREEN AT This call will copy the content of the window on screen with the given location and size to an array in memory. __________________________________________________________________________ MOVE CURSOR CALL GOTOXY(I,J) INPUT Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 I : COLUMN J : ROW This call send the cursor to the given location on screen. __________________________________________________________________________ MOVE CURSOR IN WINDOW CALL WGOTOXY(I,J) INPUT I : COLUMN J : ROW This call send the cursor to the given location on last opened window. __________________________________________________________________________ Get Address of Cursor CALL GETXY(I,J) OUTPUT I : Column J : ROW This call will return the current position of the cursor. __________________________________________________________________________ Get Address of Cursor in Window CALL WGETXY(I,J) OUTPUT I : Column J : ROW This call will return the current position of the cursor in the last opened Window. __________________________________________________________________________ Read an integer variable in window CALL WREADI(I,J,IVAR,LENGTH,IA) Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 INPUT I,J : COORDINATES OF STARTING FIELD ADDRESS LENGTH : FIELD LENGTH IA : ATTRIBUTE TO BE USED IN FIELD OUTPUT IVAR : INTEGER VARIABLE READ. This call reads an integer in a field.The coordinates used is relative to the last opened window. __________________________________________________________________________ Read a real variable in window CALL WREADR(I,J,VAR,LENGTH,IA) INPUT I,J : COORDINATES OF STARTING FIELD ADDRESS LENGTH : FIELD LENGTH IA : ATTRIBUTE TO BE USED IN FIELD OUTPUT VAR : REAL VARIABLE READ. This call reads a real number in a field.The coordinates used is relative to the last opened window. __________________________________________________________________________ Read a String in window CALL WREADS(I,J,STRING,LENGTH,LENACT,IA) CHARACTER*1 STRING(LENGTH) INPUT I,J : COORDINATES OF STARTING FIELD ADDRESS LENGTH : FIELD LENGTH IA : ATTRIBUTE TO BE USED IN FIELD OUTPUT STRING : CHARACTER ARRAY READ. LENACT : LENGTH OF ENTERED STRING This call reads a string in a field.The coordinates used is relative to the last opened window. __________________________________________________________________________ READ an Integer variable Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 CALL READI(I,J,IVAR,LENGTH,IA) INPUT I,J : COORDINATES OF STARTING FIELD ADDRESS LENGTH : FIELD LENGTH IA : ATTRIBUTE TO BE USED IN FIELD OUTPUT IVAR : INTEGER VARIABLE READ. This call reads an integer in a field.The coordinates used is the screen coordinates. __________________________________________________________________________ READ a Real variable CALL READR(I,J,VAR,LENGTH,IA) INPUT I,J : COORDINATES OF STARTING FIELD ADDRESS LENGTH : FIELD LENGTH IA : ATTRIBUTE TO BE USED IN FIELD OUTPUT VAR : REAL VARIABLE READ. This call reads a real number in a field.The coordinates used is screen coordinates. __________________________________________________________________________ READ a String CALL READS(I,J,STRING,LENGTH,LENACT,IA) CHARACTER*1 STRING(LENGTH) INPUT I,J : COORDINATES OF STARTING FIELD ADDRESS LENGTH : FIELD LENGTH IA : ATTRIBUTE TO BE USED IN FIELD OUTPUT STRING : CHARACTER ARRAY READ. LENACT : LENGTH OF ENTERED STRING This call reads a string in a field.The coordinates used is the screen coordinates. __________________________________________________________________________ Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 MOVE WINDOW CALL MOVWIN(I,J) INPUT I,J : NEW COORDINATES OF WINDOW'S LEFT UPPER CORNER This call will move the last opened window to the new location. __________________________________________________________________________ Print a Character CALL printc(I,J,CHAR,IA) CHARACTER*1 CHAR INPUT I,J : LOCATION ON SCREEN CHAR : CHARACTER TO BE PRINTED IA : ATTRIBUTE OF CHARACTER This call print a character at the given location. __________________________________________________________________________ Print a string CALL PRNSTR(I,J,STR,LENGTH,IA) CHARACTER*1 STR(LENGTH) INPUT I,J : LOCATION ON SCREEN STR : STRING TO PRINT LENGTH : LENGTH OF STRING IA : ATTRIBUTE OF STRING This call will print a string at the given location of screen. __________________________________________________________________________ Print a Character in window CALL wprnch(I,J,CHAR,IA) CHARACTER*1 CHAR INPUT I,J : LOCATION ON WINDOW CHAR : CHARACTER TO BE PRINTED IA : ATTRIBUTE OF CHARACTER Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 This call print a character at the given location with respect to last opened window. __________________________________________________________________________ Print a string in window CALL WPRNST(I,J,STR,LENGTH,IA) CHARACTER*1 STR(LENGTH) INPUT I,J : LOCATION ON WINDOW STR : STRING TO PRINT LENGTH : LENGTH OF STRING IA : ATTRIBUTE OF STRING This call will print a string at the given location of window. __________________________________________________________________________ Scroll UP window CALL WSCRUP(I) INPUT I : # OF LINES TO SCROLL This call will scroll up the last opened window the given # of lines. __________________________________________________________________________ Scroll DOWN window CALL WSCRDN(I) INPUT I : # OF LINES TO SCROLL This call will scroll down the last opened window the given # of lines. __________________________________________________________________________ Clear Screen Call CLS(IATT) INPUT Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 IATT : Screen attribute Integer ( zero uses default) This call will clear the screen. __________________________________________________________________________ Scroll Up CALL SCRLUP(x1,y1,x2,y2,length,attrib) Input : x1,y1 upper left corner x2,y2 lower right corner attrib attribute length # of line to scroll all variable are integer*4 This proc scroll up a window with the given coordinate and given attribute if attribute is 0 then use last used attribute __________________________________________________________________________ Scroll Down CALL SCRLDN(x1,y1,x2,y2,length,attrib) Input : x1,y1 upper left corner x2,y2 lower right corner attrib attribute length # of line to scroll all variable are integer*4 This proc scroll down a window with the given coordinate and given attribute if attribute is 0 then use last used attribute __________________________________________________________________________ peek FUNCTION integer*2 peek(SEG,OFF) input : seg segment address of memory off offset address of memory output : memory value This function returns the contents of the word at the given segment and offset. Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 __________________________________________________________________________ poke CALL poke(seg,off,value) input : seg segment address of memory off offset address of memory value value of byte This call writes a byte at the given memory location. __________________________________________________________________________ wpoke Calling sequence wpoke(seg,off,value) input : seg segment address of memory off offset address of memory value value of word This call write a word at a given memory location. __________________________________________________________________________ getkey call getkey(char,scan) OUTPUT CHAR : CHARACTER IN KEYBOARD SCAN : SCAN CODE This call reads the character in keyboard buffer. If finds nothing waits for one and then return. __________________________________________________________________________ Generate Sound call sound(frequency,delay) input freq : frequency (integer) delay : delay time (integer) __________________________________________________________________________ Copyright Tareq G. AboAlfaraj 1987. WINDOWS FOR FORTRAN Nov 15,87 Ver. 1.02 Hide Cursor call hidcur This call hide the cursor __________________________________________________________________________ Show Cursor call shwcur This call shows the cursor. __________________________________________________________________________ Change attribute of Screen call chattr(i,j,id,jd,iatt) INPUT I : UPPER LEFT WINDOW CORNER COLUMN J : UPPER LEFT WINDOW CORNER ROW ID : # OF COLUMNS IN WINDOW JD : #OF ROWS IN WINDOW IATT : ATTRIBUTE This call change the attribute of the given region of screen. __________________________________________________________________________ Change attribute of region in window call wchatt(i,j,id,jd,iatt) INPUT I : UPPER LEFT REGION COLUMN J : UPPER LEFT REGION ROW ID : # OF COLUMNS IN REGION JD : #OF ROWS IN REGION IATT : ATTRIBUTE This call change the attribute of the given region in the last accessed window. __________________________________________________________________________ ----------------end-of-author's-documentation--------------- Software Library Information: This disk copy provided as a service of The Public (Software) Library We are not the authors of this program, nor are we associated with the author in any way other than as a distributor of the program in accordance with the author's terms of distribution. Please direct shareware payments and specific questions about this program to the author of the program, whose name appears elsewhere in this documentation. If you have trouble getting in touch with the author, we will do whatever we can to help you with your questions. All programs have been tested and do run. To report problems, please use the form that is in the file PROBLEM.DOC on many of our disks or in other written for- mat with screen printouts, if possible. The P(s)L cannot de- bug programs over the telephone. Disks in the P(s)L are updated monthly, so if you did not get this disk directly from the P(s)L, you should be aware that the files in this set may no longer be the current versions. For a copy of the latest monthly software library newsletter and a list of the 1,000+ disks in the library, call or write The Public (Software) Library P.O.Box 35705 - F Houston, TX 77235-5705 (713) 721-6104 or (713) 721-5205